package com.zl.csMall.mine.recAddress.po;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * @description: 用户收货地址
 * @author: ChenNing
 * @date 2025-10-15 17:27
 */
@Data
@ApiModel(description = "用户收货地址 实体")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class RecAddress implements Serializable {

    private static final long serialVersionUID = 1L;

    private long id;

    @ApiModelProperty(value = "用户ID")
    private Long userId;

    @ApiModelProperty(value = "收货人名称", required = true)
    @NotNull(message = "不能为空！")
    @NotBlank(message = "不能为空！")
    private String name;

    @ApiModelProperty(value = "电话", required = true)
    @NotNull(message = "不能为空！")
    @NotBlank(message = "不能为空！")
    private String phone;

    @ApiModelProperty(value = "收货地址 - 省 ID", required = true)
    @NotNull(message = "不能为空！")
    private Long province;

    @ApiModelProperty(value = "收货地址 - 市 ID", required = true)
    @NotNull(message = "不能为空！")
    private Long city;

    @ApiModelProperty(value = "收货地址 - 区 ID", required = true)
    @NotNull(message = "不能为空！")
    private Long area;

    @ApiModelProperty(value = "收货地址 - 详情", required = true)
    @NotNull(message = "不能为空！")
    @NotBlank(message = "不能为空！")
    private String info;

    @ApiModelProperty(value = "收货地址", required = true)
    @NotNull(message = "不能为空！")
    @NotBlank(message = "不能为空！")
    private String address;

    @ApiModelProperty(value = "是否默认（1：是、2：否）")
    private Integer isDefault;

    private Date createDate;

    private Date updateDate;

}
